#include <iostream>
#include <string>

using namespace std;

int main() {
    int n, L, v;
    cin >> n >> L >> v;

    int *a = new int[n];
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }

    sort(a, a + n, [&](int x, int y) -> int {
        return x > y;
    });

    int q;
    cin >> q;
    int *t = new int[q];
    for (int i = 0; i < q; ++i) {
        cin >> t[i];
        t[i] *= 3; // 变成距离
    }

    int *ss = new int[n];
    ss[0] = a[0];
    for (int i = 1; i < n; ++i) {
        ss[i] = ss[i - 1] + a[i];
    }

    for (int i = 0; i < q; ++i) {
        if (t[i] < L) {
            cout << "-1" << endl;
            continue;
        }
        for (int j = 0; j < n; ++j) {
//            cout << 1 << " " << t[j] << endl;
//            cout << 2 << " " << ss[j] << endl;
//            cout << t[j] - ss[j] << endl;
            if (t[j] - ss[j] < L) {
                cout << j + 1 << endl;
                break;
            }
        }
    }
}